package com.apestech.framework.sql;

import com.apestech.framework.json.JSONArray;
import com.apestech.framework.json.JSONObject;

/**
 * @author hup
 * @create 2018-11-23-16:41
 */
public class MakeCondition {
    public void addField(String field, String operator, Object value, JSONObject map){
        JSONArray list= (JSONArray) map.get("condition");
        if(list==null) list=new JSONArray();
        JSONObject m=new JSONObject();
        m.put("field", field);
        m.put("operator", operator);
        m.put("value", value);
        list.add(m);
        map.put("condition", list);
    }
}
